<?php
include("./mysql-connect.php");
$username = $_POST['username'];
$password = $_POST['password'];
$res = mysqli_query($con,"select * from user where username='$username' and password='$password'");
$row = mysqli_fetch_assoc($res);
if($row){
    $arr = [
    "meta"=>[
        "status"=>1,
        "msg"=>"登陆成功"
    ]
];
}else{
    $arr = [
        "meta"=>[
            "status"=>0,
            "msg"=>"用户名或者密码错误"
        ]
    ];

}
echo json_encode($arr);

